package roborally.usableitems;

import roborally.supporting.PhysicalAmount;
import be.kuleuven.cs.som.annotate.Basic;
import be.kuleuven.cs.som.annotate.Immutable;
import be.kuleuven.cs.som.annotate.Raw;

/**
 * An interface specifying something that has a weight.
 * 
 * @author Molderez Tom, 2de bach Ingenieurswetenschappen Computerwetenschappen-Elektrotechniek and Reniers Jorn, 2de bach Ingenieurswetenschappen Werktuigkunde-Computerwetenschappen
 * @version 1.0
 */
public interface ItemWithWeight extends Comparable<ItemWithWeight> {

	/**
	 * Returns the weight of this battery.
	 */
	@Basic @Raw @Immutable	
	public abstract PhysicalAmount getWeight();

	/**
	 * Compares the item with weight to this one.
	 * 
	 * @param item The item with which this must be compared.
	 * @return
	 * 		| result == this.getWeight().compareTo(item.getWeight())
	 * @throws IllegalArgumentException
	 * 		| usable == null
	 */
	@Override
	public abstract int compareTo(ItemWithWeight item) throws IllegalArgumentException;
		
}
